\section{Choosing Vibration Patterns}
When designing vibration patterns to be used with the controller, theory behind haptic vibrations and design guidelines are needed.

Note that in the following, the term \textit{haptics} will be used to describe vibrations, although some sources interchangeably use both \textit{haptics} and \textit{tactile}. It must also be noted that only information relevant for vibrations in regards to the Xbox 360 controller will be considered.

\subsection{Theory} \label{Theory}
In \citep{multimodalDesign}, different modalities such as visual, auditory, and haptics are described and compared to each other. It is stated that the haptic modality is best suited for tasks that are temporal, require attention, and require hand-eye coordination. Haptics are also described as being well-suited for delivering information such as alerts and warnings; private and confidential; persistent; and information that describes the properties of an object, e.g.\ texture or softness. The fact that it's well-suited for private and confidential information makes it interesting when dealing with asymmetric information.

Since the vibrations need to be able to convey information to players, some kind of information-coding is needed. \citep{vibrationGuidelines} explains a set of guidelines on the design of systems using haptic vibrations. He mentions four types of information-coding: \textit{subjective magnitude}, \textit{frequency}, \textit{temporal patterns}, and \textit{location}.

Subjective magnitude is defined by \citep{vibrationGuidelines} as being influenced by a range of different factors. It is influenced by the amount of power applied to the vibration (also known as the \textit{amplitude}), the signal frequency of the vibration, and where on the body the vibration is felt. It is further explained that the subjective magnitude can be used to output different intensities, which can be used to convey differently-coded information. Here, it is important to keep in mind that a maximum of four different intensities should be used, since humans otherwise cannot tell the difference between intensities \citep{vibrationGuidelines}.

Furthermore, the intensities should lie between the \textit{detection threshold} and \textit{pain threshold}. The detection threshold refers to the lowest intensity that can be felt, while the pain threshold refers to the highest intensity that does not inflict pain. These thresholds differ compared to where on the body the vibrations are felt. Some of the lowest detection thresholds are found on hands and fingers, meaning that they are some of the most sensitive body parts.
%Pain threshold is an amplitude 0.6-0.8. Amplitudes above this are painful.

The frequency of the vibration is described by \citep{vibrationGuidelines} as being correlated with the subjective magnitude, meaning that different frequencies with the same amplitude will result in different subjective magnitudes. \citep{vibrationGuidelines} also explains that in order to make the vibration signals distinguishable from each other, a maximum of nine unique frequency levels should be used. In addition, it is mentioned that there should be at least 20 percent difference between the levels. In regards to the Xbox 360 controller, as mentioned in Section \ref{XboxController}, only two frequencies are available: a low frequency on the left motor and a high frequency on the right motor. The amplitudes can then be regulated to create different intensities. 

\citep{vibrationGuidelines} also defines temporal patterns as being a way of coding information. For this, it is important that the time interval between different vibration signals is at least 10 milliseconds in order to make it possible to distinguish the signals from each other. The effect of two vibration signals being too close to each other is called \textit{temporal masking}. Other than increasing the time between two vibration signals, this effect can be avoided by either giving each vibration signal its own location or frequency level. If the time between signals is within 100 and 500 milliseconds, there is also a chance that \textit{temporal enhancement} will occur, causing the subjective magnitude of the second stimulus to feel stronger than the previous \citep{vibrationGuidelines}. Furthermore, he mentions that temporal sensitivity of the skin is very high, making it an ideal coding type.

The last type of information-coding described by \citep{vibrationGuidelines} is coding by location. Here, it is important that the density of actuators correlate to the spatial resolution of the body parts that are stimulated, or else the \textit{spatial masking} effect might occur. This effect makes it difficult to tell the locations of different vibrations apart, due to the actuators being positioned too close to each other. As with temporal masking, the problem can be solved by either positioning the actuators further apart or by giving the vibrations different frequency levels. Hands and fingers, for instance, have high spatial resolution, meaning that they are ideal for having a high density of actuators and are thereby suited for more complex-coded information. Figure \ref{fig:bigBoy} metaphorically illustrates how sensitive human hands are. As mentioned earlier, the Xbox 360 controller has two different motors, one on the left side, and one on the right side of the controller. This opens up the possibility of coding by location.

\begin{figure}[htbp]
\centering
\includegraphics[width=0.40\textwidth]{Pictures/Design/SensitiveBodyAreas}
\caption{Visual metaphor for how sensitive the individual body parts are. Bigger means more sensitive \citep{SensitiveBodyAreas}.}
\label{fig:bigBoy}
\end{figure}

To make the information delivered through vibrations easy to understand, \citep{vibrationGuidelines} explains that the vibrations must be self-explanatory and composed of meaningful components, especially if the information conveyed is complex. In order to design a system that delivers information through vibrations without overwhelming its users, it is important to consider how many options to deliver. \citep{hicksLaw} states that the amount of options a user has for any given task is proportional to how long it will take the user to complete that task.  

%The time taken to process a certain amount of bits is known as the rate of gain of information.

%In order to distinguish individual vibration signals from each other, the signals must be seperated by at least 5.5 milli seconds, and preferably over 10 milli seconds. Furthermore, it is stated that humans can identify up to about four haptic intensities, five durations, and nine different frequencies with a 20 percent \textbf{(PROCENT TEGN)} difference between levels.

%tactile cues such as vibrations or varying pressures can be used to serve information regarding location, texture, softness, surface viscosity, and function as effective simple alerts or warnings. 

%The human processor model (INSERT REFERENCE TO MIT LECTURE) describes the processing of information in an abstract way and from an engineering perspective, starting from the moment a person either sees, hears or feels something, known as sensory input, to the moment a person responds with an action, making it a closed feedback loop. As seen in Figure (INSERT HPM figure), there are three stages after receiving the sensory input. The perceptual processor compares the received input to symbols such as letters, words

%Perceptual: 50-200ms
%Cognitive: 30-100ms
%Motor: 25-170ms
%Two stimuli within the same PP cycle (100ms) appear fused
%Mechanorecepturs (pressure)
%- Mr - Meissner corpuscle (flutter, motion)
%MI - Merkel cell - neurite complex (pressure, form, texture)
%R - Ruffini ending (skin stretch)
%P - Pacinian corpuscle (vibration)
%
%ERM:
%Can provide a relatively strong vibrotactile sensation
%Can only produce frequency of vibration correlated with intensity
%
%How can haptics be used?
%Rhythm, amplitude frequency and location
%For categorical information and continuous information
%
%Good for tasks:
%- that are temporal
%- require alarming attention
%involve hand-eye coordination (e.g. object manipulation) with haptic sensing and feedback
%- Patterns and spatial temporal information
%- that need to communicate location, texture, surface viscosity
%
%Perceptual fusion - e.g. two different images that are so close to each other that they appear the same (100ms)
%
%Humans cannot temporally align audible and visual stimuli if they are less than 20ms apart.
%
%People can resolve a temporal gap of 5ms between successive taps on the skin (Haptic perception, a tutorial, page 1442)
%
%Research hz and so on in Xbox controller
%
%Something to keep in mind: Perceptual processors can vary in speed from person to person as well as from context to context. For instance, people react faster in videogames than for instance in driving at a low speed.
%
%Lars Knudsen page 2: Four primary parameters are studied in relation to vibrotactile
%perception: amplitude, frequency, timing, and
%location.
%Lars Knudsen page 2: Guidelines on tactile information coding

\subsection{Describing the Vibration Patterns} \label{VibPatterns}
Based on the different types of information-coding for vibration signals, the vibration patterns for this project can now be designed. The  patterns will be designed in such a way that each coding type can be tested independently, so it is clear exactly how well each coding type works by itself. This means that coding types will not be combined. Furthermore, for each vibration pattern, four variations of that pattern type will be designed to allow different information to be delivered through the vibration patterns. Note that any type of vibration signal will from this point forward be referred to as a \textit{vibration pattern} or simply \textit{patterns}. The five patterns designed for this project are:

\begin{itemize}
\item Static Intensity
\item Varying Intensity
\item Right-left
\item Morse Code
\item Interval
\end{itemize}

By using the subjective magnitude coding type, patterns can be made by utilizing different intensity levels. The XInput interface allows setting the intensity of each of the two motors in the controller individually, by specifying a floating point number between 0.0 and 1.0. In the XInput reference manual this value is called \textit{speed} \citep{xinputSpeed}. It was mentioned in Section \ref{Theory} that subjective magnitude is mostly influenced by frequency and amplitude. The fact that the vibration motors in the controller are ERM motors might be the reason as to why amplitude and frequency cannot be accessed individually \citep{ermAmplitudeFrequency}. 

Two vibration patterns have been designed using intensity levels. One of them is a constant intensity, dubbed \textit{static intensity}, while the other is \textit{varying intensity}. Both patterns use the two motors in the controller simultaneously at the same intensity, and at a duration of 2 seconds.

For \textit{static intensity}, the vibrations occur in short bursts and only four different intensity levels are used, since as mentioned in Section \ref{Theory}, people cannot recognize more than four different intensities. This matches the fact that each vibration pattern needs four variations, allowing one intensity level for each variation. The intensity levels are: 0.2, 0.4, 0.6, and 0.8 (see Figure \ref{fig:StaticIntensityPattern}).

\textit{Varying intensity} uses continuous vibrations that either ascend or descend. The four variations are: $0.0 - 0.5$, $0.5 - 1.0$, $0.5 - 0.0$ and $1.0 - 0.5$ (see Figure \ref{fig:VaryingIntensityPattern}). Ascending and descending vibrations were included to utilize the extra complexity that varying intensities can bring.

\begin{figure}[htbp] \centering
\begin{minipage}[b]{0.45\textwidth} \centering
\includegraphics[width=0.25\textwidth]{Pictures/Design/Static_Intensity_Rumble_checker} % Venstre billede
\end{minipage} \hfill
\begin{minipage}[b]{0.45\textwidth} \centering
\includegraphics[width=0.25\textwidth]{Pictures/Design/Varying_Intensity_Rumble_checker} % Højre billede
\end{minipage} \\ % Captions og labels
\begin{minipage}[t]{0.45\textwidth}
\caption{Static Intensity Pattern. 100 percent corresponds to an intensity of 1.0, meaning max intensity.} % Venstre caption og label
\label{fig:StaticIntensityPattern}
\end{minipage} \hfill
\begin{minipage}[t]{0.45\textwidth}
\caption{Varying Intensity Pattern. 100 percent corresponds to an intensity of 1.0, meaning max intensity.} % Højre caption og label
\label{fig:VaryingIntensityPattern}
\end{minipage}
\end{figure}

For the rest of the vibration patterns, which do not incorporate intensity levels for information-coding, an intensity of 1.0 was chosen. This is due the fact that in Section \ref{Hips}, it was concluded that players barely noticed each others' vibrations, even at the highest intensities. This means that no matter the intensity, keeping the information asymmetric (hidden) is not a problem. By using an intensity of 1.0, it will be more clear to users which vibration is being played.

Regarding the frequency-coding type, it is not possible to isolate it from the location-coding type, since the two motors each have their own locked frequencies (see Section \ref{XboxController}).

A vibration pattern called \textit{right-left} has been designed. It is similar to the \textit{static intensity} pattern, in that it only vibrates in short bursts of 2 seconds, the difference being that the intensity is constant for each variation, and that the vibration is only activated in one of the two motors at any given time. This also means that there can be no more than two variations of this vibration pattern, meaning that the potential complexity for this pattern alone is limited compared to the rest. It should be noted that the exact frequencies of the two motors are not described anywhere in the programming reference for XInput, making it unclear whether or not the two frequencies actually are 20 percent apart from each other, as mentioned in Section \ref{Theory}. In addition, it is unclear whether or not spatial masking occurs, but through observations this seemed not to be the case.

%The chosen intensity for this pattern is 1 for each motor, as it has been observed that the higher the intensity, the easier it is to tell if the vibration has a high or low frequency. This makes it easier to distinguish the variations from each other.

%Both intensity patterns as well as the right left patterns have intensities that go up to 1. Although this might be a problem regarding users hiding the vibrations from each other, this makes it easier to distinguish the variations from each other.

For the temporal information-coding type, two vibration patterns have been designed: \textit{morse code} and \textit{interval}.

Both patterns have an interval between vibrations of 600 milliseconds, in order to avoid the effect of temporal masking, as well as temporal enhancement. The \textit{morse code} vibration pattern has variations based on the letters "B", "C", "R" and "U" from the \textit{morse code} alphabet (see Figure \ref{fig:MorseCodeTable}). These patterns were chosen, since they use different combinations of long and short signals, making the patterns easy to distinguish from each other without being too simple (see Figure \ref{fig:MorseCodePattern}). It has been assumed that most people don't know the morse code alphabet on the top of their heads; this makes the actual letters chosen less important. No further considerations were made in regards to the actual letters in the morse code alphabet, since the only aspect of interest is the vibrations themselves.

\begin{figure}[htbp]
\centering
\includegraphics[width=0.50\textwidth]{Pictures/Design/MorseCodeTable}
\caption{Morse code table. Each letter contains a combination of signals. Dots correspond to short signals, while dashes correspond to long signals \citep{morseCode}.}
\label{fig:MorseCodeTable}
\end{figure}

To make a vibration pattern that is self-explanatory, as mentioned in Section \ref{Theory}, and not based on a language that the user has to learn first (such as morse code), the \textit{interval} pattern has been designed (see Figure \ref{fig:IntervalPattern}). The number of vibration repetitions corresponds to an actual number from 1-4. The advantage of this pattern is that there is a natural mapping between the vibration and the information conveyed through the pattern. A single vibration can be translated into the number "1", two vibrations the number "2", etc.

\begin{figure}[htbp] \centering
\begin{minipage}[b]{0.45\textwidth} \centering
\includegraphics[width=0.25\textwidth]{Pictures/Design/Morse_Rumble_checker} % Venstre billede
\end{minipage} \hfill
\begin{minipage}[b]{0.45\textwidth} \centering
\includegraphics[width=0.25\textwidth]{Pictures/Design/Interval_Rumble_checker} % Højre billede
\end{minipage} \\ % Captions og labels
\begin{minipage}[t]{0.45\textwidth}
\caption{The four \textit{morse code} pattern variations, based on the letters "B", "R", "C" and "U" from Figure \ref{fig:MorseCodeTable}.} % Venstre caption og label
\label{fig:MorseCodePattern}
\end{minipage} \hfill
\begin{minipage}[t]{0.45\textwidth}
\caption{\textit{Interval} pattern, ranging from 1-4 vibration repetitions.} % Højre caption og label
\label{fig:IntervalPattern}
\end{minipage}
\end{figure}

Before these patterns can be tested and compared to each other in an experiment, a list of criteria must be made in order to pinpoint what aspects are important to deliver asymmetric information.

\subsection{Criteria for the Vibration Patterns} \label{VibrationCrit}
Through observations, mainly from the preliminary experiment mentioned in Section \ref{Hips}, important aspects of the vibrations were noticed. From this, a list of criteria has been made. These are:

\begin{itemize}
\item Speed
\item Complexity
\item Concealment
\item Difficulty
\end{itemize}

\textit{Speed} refers to the users' reaction times, which is important in order to see how fast people react. Here, both their perceived speed as well as their actual speed is necessary. This will be measured by asking how fast people think their reaction times were, as well as logging how long it actually takes for them to press a button from the time the vibration ends.

\textit{Complexity} investigates how complex information a user believes the pattern can deliver. This criteria is relevant for getting a rough idea of how many possibilities each pattern has for delivering different information to the users.

\textit{Concealment} describes how much users were aware and distracted of each others' vibrations, for the purpose of indicating whether or not the patterns can be used to deliver asymmetric information. This requires that several users are positioned close to each other in the experiment. For this criteria, users will be given two questions, asking how aware and how distracted they were. 

\textit{Difficulty} describes how correct the users' answers are, while also measuring their reaction times. As mentioned in the speed criteria, users will have to press a button when perceiving a vibration pattern. To measure their comprehension of the pattern, the experiment will have multiple buttons that each correspond to a pattern variation, requiring the users to press the correct button. The difficulty of each pattern will include how difficult users think the vibration pattern was, how correct their button presses actually were, as well as their reaction times.

With this list of criteria, the different vibration patterns are now ready to be examined further through an experiment.